﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HA.Data
{
    public class Scatter2DPointsChangedEventArgs:EventArgs
    {
        /// <summary>
        /// 添加编辑时使用
        /// </summary>
        /// <param name="layerId"></param>
        /// <param name="sp"></param>
        /// <param name="operationType"></param>
        public Scatter2DPointsChangedEventArgs(string layerId, ScatterPoint sp,ObjectOperationType operationType)
        {
            this._layerId = layerId;
            this._scatterPoint = sp;
            this._operationMode = operationType;
        }

        /// <summary>
        /// 删除时使用
        /// </summary>
        /// <param name="layerId"></param>
        /// <param name="ids"></param>
        public Scatter2DPointsChangedEventArgs(string layerId, List<string> ids)
        {
            this._layerId = layerId;
            this._operationMode = ObjectOperationType.REMOVE;
            if (ids == null)
                _idsForDelete = new List<string>();
            else
                this._idsForDelete = ids;
        }


        string _layerId;
        /// <summary>
        /// 进行操作的图层Id
        /// </summary>
        public string LayerId
        {
            get { return _layerId; }
            set { _layerId = value; }
        }

        List<string> _idsForDelete;
        /// <summary>
        /// 删除时使用
        /// </summary>
        public List<string> IdsForDelete
        {
            get { return _idsForDelete; }
            set { _idsForDelete = value; }
        }

        ScatterPoint _scatterPoint;
        /// <summary>
        /// 添加编辑时使用
        /// </summary>
        public ScatterPoint ScatterPoint
        {
            get { return _scatterPoint; }
            set { _scatterPoint = value; }
        }

        ObjectOperationType _operationMode;
        /// <summary>
        /// 操作方式
        /// </summary>
        public ObjectOperationType OperationMode
        {
            get { return _operationMode; }
            set { _operationMode = value; }
        }
    }
}
